﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace test
{
    public partial class frmDemo : Form
    {
        public frmDemo()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Thread td = new Thread(new ThreadStart(DoIt));
            td.IsBackground = true;
            td.Start();
            IBOBO_Controls.Function.ShowProcessBar(this, 10, "正在加载，请稍候。。。", td);
        }

        void DoIt()
        {
            for (int i = 0; i < 10; i++)
            {
                IBOBO_Controls.Function.ProcessBarPerformStep(this, "当前进度：" + (i+1).ToString() + "/10");
                Thread.Sleep(1000);
            }
            IBOBO_Controls.Function.CloseProcessBar(this);
        }
    }
}
